<?php header('Content-Type: text/html; charset=utf-8'); ?>
<div id="totalProductos" class="total">
	<div class="menu bubplastic horizontal aqua">
		<ul>
			<li class="highlight"><span class="menu_r"><a href="productos" target="_self"><span class="menu_ar">Productos</span></a></span></li>
			<li><span class="menu_r"><a href="platos" target="_self"><span class="menu_ar">Ingresar Platos</span></a></span></li>
			<li><span class="menu_r"><a href="catalogos" target="_self"><span class="menu_ar">Menus</span></a></span></li>
			<li><span class="menu_r"><a href="menus" target="_self"><span class="menu_ar">Salir</span></a></span></li>
		</ul>
		<br class="clearit" />
	</div>
	<?php
			echo $form->create('buscador', array('class'=>'formulario'));
			echo $form->text('product', array('class' => 'entradas'));
			echo $form->button('  Buscar  ', array('class'=> 'busca'), array('action'=>'index'));
			echo $form->end();
	?>
	<div class="barras">
		<div class="titu1">Categoria</div>
		<div class="titu2">Nombre del Plato</div>
		<div class="titu3">Precio</div>
		<div class="titu4">&nbsp&nbsp Modificar &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Activar/Desactivar/Eliminar</div>
	</div>
	<div class="raya"></div>
	<table class="tablas">
		<?php
			foreach ($productos as $producto)
			{
				echo "<tr>";
					foreach ($tipos as $tipo)
					{
						if ($tipo ['Tipo']['id']==$producto ['Producto']['tipo_id'])
							echo "<td class='tabla3'>".$tipo ['Tipo']['nombre']."</td>";
					}
					echo "<td class='tabla1'>".$producto ['Producto']['nombre']."</td>";
					echo "<td class='tabla2'>".$producto ['Producto']['valor']."</td>";
					
					echo "<td class='fila'>";
					?>
						<button type='button' onclick="location.href = 'otra_pagina.html'" class='botoncito' > Modificar </button>
						<?php
						echo "<select name='active' id='active' class='box'>";
							if ($producto ['Producto']['activo']==0)
							{
								echo "<option value='".$producto ['Producto']['id']."'>&nbsp&nbsp Activado &nbsp&nbsp</option>";
								echo "<option value='0'> Desactivado </option>";
								echo "</select>";
							}
							else
							{
								echo "<option value='0'> Desactivado </option>";
								echo "<option value='".$producto ['Producto']['id']."'>&nbsp&nbsp Activado &nbsp&nbsp</option>";
								echo "</select>";
							}
							
						?>
						<button type='button' onclick="location.href = 'otra_pagina.html'" class='elimina' ></button>
					<?php
					echo "</td>";
				echo "</tr>";
			}	
		?>
	</table>
	<div class="raya"></div>
	<button type="submit" onclick="location.href = 'otra_pagina.html'" class="botones" >Salvar</button>
	<button type='submit' onclick="location.href = 'otra_pagina.html'" class='botones' >Exportar</button>
</div>